#import "NirvanaInstinctCell.h"


@implementation NirvanaInstinctCell

- (instancetype)initWithFrame:(CGRect)frame {
	self = [super initWithFrame:frame];
	if (self) {
		//self.contentView.backgroundColor = UIColor.whiteColor;
	}
	return self;
}

- (void)setHammer:(NirvanaInstinctModel *)hammer {
	_hammer = hammer;

	//: 配置cell的UI

	self.juggleJewelYearnLabel.text = [NSString stringWithFormat:@"Count: %lu", (unsigned long)hammer.zest.count];

	self.freedomLabel.text = hammer.vivid ? @"YES" : @"NO";

	self.anticipateLabel.text = [hammer.flexibilityEclipseBalance stringValue];



	if (hammer.zest.count > 0) {
		[self.vividImageView sd_setImageWithURL:[NSURL URLWithString:hammer.zest[0]] placeholderImage:nil];
	}

}
//: _apprehensionQuirkButton 的点击事件
- (void)action_4 {}

- (UIButton *)apprehensionQuirkButton {
	if (!_apprehensionQuirkButton) {
	
        _apprehensionQuirkButton = [[UIButton alloc] init];
        _apprehensionQuirkButton.frame = CGRectMake(50, 29, 159, 50);
        UIImage *glow = [UIImage imageNamed:@"images/icon_4.png"];
        if (glow) {
	        [_apprehensionQuirkButton setImage:glow forState:UIControlStateNormal];
        }
        [_apprehensionQuirkButton setTitle:@"button_4" forState:UIControlStateNormal];
        [_apprehensionQuirkButton setTitle:@"button_selected_4" forState:UIControlStateSelected];
        [_apprehensionQuirkButton setTitleColor:[UIColor colorWithRed:31/255.0 green:188/255.0 blue:40/255.0 alpha:0.9] forState:UIControlStateNormal];
        [_apprehensionQuirkButton setTitleColor:[UIColor colorWithRed:123/255.0 green:174/255.0 blue:3/255.0 alpha:0.9] forState:UIControlStateSelected];
        [_apprehensionQuirkButton addTarget:self action:@selector(action_4) forControlEvents:UIControlEventTouchUpInside];
	}
	return _apprehensionQuirkButton;
}

- (UILabel *)anticipateLabel {
	if (!_anticipateLabel) {
	
        _anticipateLabel = [UILabel new];
        _anticipateLabel.frame = CGRectMake(7, 23, 120, 180);
        _anticipateLabel.text = @"label_5";
        _anticipateLabel.font = [UIFont systemFontOfSize:20 weight:UIFontWeightBold];
        _anticipateLabel.textColor = [UIColor colorWithRed:25/255.0 green:112/255.0 blue:151/255.0 alpha:0.7];
        _anticipateLabel.textAlignment = NSTextAlignmentLeft;
        _anticipateLabel.numberOfLines = 0;
	}
	return _anticipateLabel;
}

//: _kindredButton 的点击事件
- (void)action_6 {}

- (UIButton *)kindredButton {
	if (!_kindredButton) {
	
        _kindredButton = [[UIButton alloc] initWithFrame:CGRectZero];
        _kindredButton.frame = CGRectMake(33, 9, 61, 84);
        UIImage *yardQuestTranquil = [UIImage imageNamed:@"images/icon_6.png"];
        if (yardQuestTranquil) {
	        [_kindredButton setImage:yardQuestTranquil forState:UIControlStateNormal];
        }
        [_kindredButton setTitle:@"button_6" forState:UIControlStateNormal];
        [_kindredButton setTitle:@"button_selected_6" forState:UIControlStateSelected];
        [_kindredButton setTitleColor:[UIColor colorWithRed:147/255.0 green:57/255.0 blue:64/255.0 alpha:0.7] forState:UIControlStateNormal];
        [_kindredButton setTitleColor:[UIColor colorWithRed:185/255.0 green:15/255.0 blue:195/255.0 alpha:0.9] forState:UIControlStateSelected];
        [_kindredButton addTarget:self action:@selector(action_6) forControlEvents:UIControlEventTouchUpInside];
	}
	return _kindredButton;
}

- (void)enigmaQuestCrispInitUIKitView {

    //: 描述_0
    UILabel *perceptiveHoverVolatile = [UILabel new];
    perceptiveHoverVolatile.size = CGSizeMake(92, 60);
    perceptiveHoverVolatile.left = 15;
    perceptiveHoverVolatile.top = 49;
    perceptiveHoverVolatile.text = @"label_0";
    perceptiveHoverVolatile.font = [UIFont systemFontOfSize:18 weight:UIFontWeightMedium];
    perceptiveHoverVolatile.textColor = [UIColor colorWithRed:108/255.0 green:48/255.0 blue:131/255.0 alpha:0.8];
    perceptiveHoverVolatile.textAlignment = NSTextAlignmentCenter;
    perceptiveHoverVolatile.numberOfLines = 3;
    self.juggleJewelYearnLabel = perceptiveHoverVolatile;
    [self.contentView addSubview:perceptiveHoverVolatile];


    //: 描述_1
    UITextView *xenonHarmony = [UITextView new];
    self.invincibleTextView = xenonHarmony;
    [self.contentView addSubview:xenonHarmony];
	[self.invincibleTextView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(166);
		make.height.mas_equalTo(82);
		make.top.equalTo(@(13));
		make.bottom.equalTo(@(23));
	}];


    //: 描述_2
    self.freedomLabel = [UILabel new];
    self.freedomLabel.text = @"label_2";
    self.freedomLabel.font = [UIFont systemFontOfSize:13 weight:UIFontWeightBold];
    self.freedomLabel.textColor = [UIColor colorWithRed:201/255.0 green:53/255.0 blue:164/255.0 alpha:0.6];
    self.freedomLabel.textAlignment = NSTextAlignmentCenter;
    self.freedomLabel.numberOfLines = 0;
    [self.contentView addSubview:self.freedomLabel];
	[self.freedomLabel mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(136);
		make.height.mas_equalTo(76);
		make.bottom.equalTo(@(12));
	}];


    //: 描述_3
    self.thistleTextField = [[UITextField alloc] init];
    [self.contentView addSubview:self.thistleTextField];
	[self.thistleTextField mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(107);
		make.height.mas_equalTo(75);
	}];

	//: 描述_4
	[self.contentView addSubview:self.apprehensionQuirkButton];

	//: 描述_5
	[self.contentView addSubview:self.anticipateLabel];

	//: 描述_6
	[self.contentView addSubview:self.kindredButton];


    //: 描述_7
    self.harbingerImageView = [UIImageView new];
    self.harbingerImageView.contentMode = UIViewContentModeScaleAspectFill;
    self.harbingerImageView.clipsToBounds = YES;
    self.harbingerImageView.layer.cornerRadius = 9;
    self.harbingerImageView.layer.masksToBounds = YES;
    UIImage *odysseyEuphoria = [UIImage imageNamed:@"images/image_7.png"];
    if (odysseyEuphoria) {
	    self.harbingerImageView.image = odysseyEuphoria;
    }
    [self.contentView addSubview:self.harbingerImageView];
	[self.harbingerImageView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(111);
		make.height.mas_equalTo(169);
		make.top.equalTo(@(29));
		make.bottom.equalTo(@(28));
	}];


    //: 描述_8
    UIImageView *flexibility = [[UIImageView alloc] initWithFrame:CGRectZero];
    flexibility.contentMode = UIViewContentModeScaleAspectFill;
    flexibility.clipsToBounds = YES;
    flexibility.layer.cornerRadius = 20;
    flexibility.layer.masksToBounds = YES;
    UIImage *kiteZipperQuirk = [UIImage imageNamed:@"images/image_8.png"];
    if (kiteZipperQuirk) {
	    flexibility.image = kiteZipperQuirk;
    }
    self.vividImageView = flexibility;
    [self.contentView addSubview:flexibility];
	[self.vividImageView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(163);
		make.height.mas_equalTo(74);
	}];
}


@end